/*
Copyright 2008  Four Roads LLC conact@4-roads.com

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either 
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using CommunityServer.Configuration;
using CommunityServer.Components;
using System.Collections;

namespace FourRoads.Links
{
	/// <summary>
	/// Summary description for ResLinkComments.
	/// </summary>
	public class ResLinkComments : CommunityServer.Components.Post , IThread
	{
		public ResLinkComments()
		{
			UserHostAddress = CSContext.Current.Context.Request.UserHostAddress;
		}

		#region Section
		private  ResLinkSection section = null; 

		/// <summary>
		/// Override Section. Returns the partent "Section" for this post if it is part of a tree
		/// </summary>
		public override  CommunityServer.Components.Section Section
		{
			get
			{
				return section;
			}
			set
			{
				section = value as ResLinkSection;
			}
		}

		#endregion

		private int _CommentRating = -1;

		public int CommentRating
		{
			get
			{
				return _CommentRating;
			}
			set
			{
				_CommentRating=value;
			}
		}

		ThreadStatus status = ThreadStatus.NotSet;
		public ThreadStatus Status 
		{
			get { return status; }
			set { status = value; }
		}

		public int AuthorID 
		{
			get 
			{
				return -1;
			}
			set 
			{
			}
		}

		// *********************************************************************
		//
		//  IsPopular
		//
		/// <summary>
		/// If thread has activity in the last 2 days and > 20 replies
		/// </summary>
		//
		// ********************************************************************/
		public bool IsPopular 
		{
			get 
			{ 
				return false;
			}
		}
        
        
		// *********************************************************************
		//
		//  IsAnnouncement
		//
		/// <summary>
		/// Not a chance as its a link
		/// </summary>
		//
		// ********************************************************************/
		public bool IsAnnouncement 
		{
			get 
			{ 
				return false;
			}
		}

		public bool IsSticky 
		{
			get 
			{
				return false;
			}
			set 
			{
			}
		}

		DateTime stickyDate = DateTime.Now.AddYears(-25);
		public DateTime StickyDate 
		{
			get 
			{
				return new DateTime();
			}
			set 
			{
			}
		}


		// *********************************************************************
		//
		//  MostRecentPostAuthor
		//
		/// <summary>
		/// The author of the most recent post in the thread.
		/// </summary>
		//
		// ********************************************************************/
		public string MostRecentPostAuthor 
		{
			get 
			{ 
				return ""; 
			}
			set 
			{ 

			}
		}

		public int MostRecentPostAuthorID 
		{
			get 
			{
				return -1;
			}
			set 
			{
			}
		}

		//Not used
		public string PreviewBody 
		{
			get 
			{
				return "";
			}
		}

		// *********************************************************************
		//
		//  MostRecentPostID
		//
		/// <summary>
		/// The post id of the most recent post in the thread.
		/// </summary>
		//
		// ********************************************************************/
		public int MostRecentPostID 
		{
			get 
			{ 
				return -1; 
			}
			set 
			{ 
			}
		}
	}
}
